package Day7;

public class Circle extends Tu {
    private double a;
    final double pi = 3.14;

    public Circle(double a) {
        this.a = a;

    }


    public double getA() {
        return a;
    }

    public void setA(double a) {
        this.a = a;
    }

    public Circle() {
    }


    @Override
    public double area() {
        System.out.print("圆形的面积是：");
        return pi*a*a;
    }

    @Override
    public double perimeter() {
        System.out.print("圆形的周长是：");
        return pi*2*a;
    }
}
